﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>PrintGongZuoJiHua</title>
    <script src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script src="~/Scripts/JsModel/Model_KaoHeBiao.js"></script>
    <script src="~/Scripts/vue.js"></script>
    <script src="~/Scripts/axios.min.js"></script>

    <style type="text/css">
        table {
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid #000000;
        }
    </style>
</head>
<body>
    <div class="form-horizontal" role="form" id="app">
        <!--startprint-->
        <div class="row">
            <div class="col-xs-5">
                <div class="input-group">
                    {{khbinfo.mkhbmc}}及完成情况
                </div>
            </div>
        </div>
        <table style="border:0px solid #ffffff">
            <tr style="border:0px solid #ffffff"><td style="border: 0px solid #ffffff;width:100px">姓名：{{khbinfo.xingming}}</td><td style="border: 0px solid #ffffff;width:100px">部门：{{khbinfo.xingming}}</td><td style="border: 0px solid #ffffff;width:100px">职务：{{khbinfo.xingming}}</td></tr>
        </table>
        <table>
            <tr>
                <td colspan="2" rowspan="2">工作类别</td>
                <td rowspan="2">工作内容</td>
                <td rowspan="2">承担人</td>
                <td rowspan="2">预计完成时间</td>
                <td rowspan="2">周</td>
                <td rowspan="2">完成情况</td>
                <td colspan="7">完成质量评定</td>
            </tr>
            <tr>
                <td>分值</td>
                <td>自评分</td>
                <td>部门主管</td>
                <td>主管校长</td>
                <td>校长</td>
                <td>督考小组</td>
                <td>实得分</td>
            </tr>
            <template v-for="(tr,trindex) in khbinfo.MyKaoHeBiaoOnes">
                <tr v-for="(son,sonindex) in tr.MyKaoHeBiaoTwos">
                        <td v-if="sonindex==0" :rowspan="tr.MyKaoHeBiaoTwos.length" >{{tr.mbnr}}</td>
                    <td>{{sonindex+1}}</td>
                    <td> {{son.mbnr}}</td>
                    <td></td>
                    <td>{{son.gzjhwcsjstr}}</td>
                    <td></td>
                    <td>{{son.gzjhwcqk}}</td>
                    <td> {{son.fz}}</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
            </template>
        </table>
        
        <!--endprint-->
        <button type="button" v-on:click="printpage()">打印</button>
    </div>

</body>
<script type="text/javascript">
    var vm = new Vue(
        {
            el: "#app",
            data: {
                khbinfo: new KaoHeBiao()
            },
            mounted() {

                this.p_GetKaoHeBiaoInfo("@ViewBag.id");
            },
            methods: {
                p_GetKaoHeBiaoInfo: function(mkhbid) {
                    var _self = this;
                    axios.get("@Url.Action("GetKaoHeBiaoInfoGZJH", "Review")", { params: { mkhbid: mkhbid } }).then((response) => {
                            _self.khbinfo = response.data;
                        },
                        (response) => {

                        }
                    ).catch(function(response) {
                        console.log(response);
                    });
                },
                printpage() {
                    //bdhtml = window.document.body.innerHTML;
                    //sprnstr = "<!--startprint-->";
                    //eprnstr = "<!--endprint-->";
                    //prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
                    //prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
                    //window.document.body.innerHTML = prnhtml;
                    window.print();
                }
            }
        });
</script>
</html>
